import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)
export default new Router({
    routes: [{
        path: '/',
        redirect: '/goods',
    },
    {
        path: '/goods',
        name: 'Goods',
        //需安装babel插件 cnpm install babel-plugin-syntax-dynamic-import --save-dev
        component: () => import('../components/Goods.vue')
    },
    {
        path:'/seller',
        name:'Seller',
        component: () => import('../components/Seller.vue')
    },{
        path:'/ratings',
        name:'Ratings',
        component: () => import('../components/Ratings.vue')
    },
    {
        path:'/payment',
        name:'Payment',
        component: () => import('../components/Payment.vue')
    },{
        path:'/order',
        name:'Order',
        component: () => import('../components/order/List.vue')
    },
    {
        path:'/order/:orderId',
        component: () => import('../components/order/Detail.vue')
    },
    {
        path:'/star',
        component: () => import('../components/Star.vue')
    }]
})